From: "Stefan Stuntz"
Date: Mon, 26 Feb 1996 19:20:48 +0100
X-Mailer: IntuiNews 1.3b Beta 5 (3.1.96)
Subject: Re: List class again
Message-Id: <81319677@magic.informatik.tu-muenchen.de>
Organization: Home of MUI
Resent-Message-Id: <"XTHSR3.0.rC2.2pVCn"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List: archive/latest/418
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
Content-Type: text
Content-Length: 233
X-Lines: 12
Status: RO
Kai Hofmann wrote in article <60805028@informatik.uni-bremen.de>:
> I think there is a need for a
>
> MUIM_List_RemoveSelected (no parameters)
What about using this?
#define MUIV_List_Remove_Selected -3
Greetings, Stefan
From: vermeuls@cuug.ab.ca (Stephen Vermeulen 237-9500)
Date: Mon, 26 Feb 1996 16:26:13 -0700
Message-Id: <9602262326.AA07544@sun>
Apparently-To: mui@sunsite.Informatik.RWTH-Aachen.DE
Resent-Message-Id: <"ot30P2.0.Wk3.P4aCn"@sunsite>
To: mui@sunsite.Informatik.RWTH-Aachen.DE
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Subject: Unidentified subject!
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List: archive/latest/425
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
Content-Type: text
Content-Length: 351
X-Lines: 17
Status: RO
Stefan,
The attributes:
MUIA_List_TopPixel
MUIA_List_TotalPixel
MUIA_List_VisiblePixel
Which you mention in the new area of the List autodocs, are not defined in
the headers which came with MUI3.3
Regards, Stephen
From: carlos@dedal.man.szczecin.pl (Marcin Orlowski)
Reply-To: carlos@dedal.man.szczecin.pl
To: mui@sunsite.Informatik.RWTH-Aachen.DE (Brett Beebe)
Date: Fri, 03 May 1996 22:03:24
Message-Id:
In-Reply-To: <318A605E.54AF@best.com>
X-Mailer: YAM 1.2 by Marcel Beck
Subject: Re: Need some help with lists and listviews.
Resent-Message-Id: <"shoZ63.0.115.gUcYn"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List: archive/latest/1200
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
Content-Type: text
Content-Length: 975
X-Lines: 26
Status: RO
Dnia 03-Maj-96 , Brett Beebe napisa�:
> Hello, need some help with lists and listviews.
>
> I make a list and listview object and all is happy in the world.
>
> I use the method MUIM_List_InsertSingle, and still everything is great.
>
> I then click on something that has beed added with InsertSingle and the
> item disappears from the list.
>
> If I then click on another name, the previous item re-appears at the new
> click point.
>
> If I hold down the button, and move up or down, the first item I clicked
> on get filled in every place I drag to.
You need to define Construct & Destruct hooks as List object does NOT
copy your string (just takes a pointer) until you order otherwise.
If you got simple one collumn list and you will be satisfied storing
just strings in it, MUI offers builtin construct hooks for this. Refer
autodocs for construct & destructs (must set both!).
Marcin http://dedal.man.szczecin.pl/~carlos
From: Gilles MASSON
To: mui@sunsite.Informatik.RWTH-Aachen.DE
Cc: masson@ogpsrv.unice.fr
Subject: Re: Floattext help needed
In-Reply-To: Your message of "Wed, 08 May 96 17:12:47 +0700."
Mime-Version: 1.0
Date: Thu, 09 May 96 11:50:24 +0200
Sender: masson@iut-soph.unice.fr
X-Mts: smtp
Resent-Message-Id: <"yUx4U1.0.5G1.w2San"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List: archive/latest/1245
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
X-Lines: 34
Status: RO
Content-Type: text/plain; charset="us-ascii"
Content-Length: 1210
> > Did you try 'set(object, MUIA_List_First, line);' ?
> >
> > it's not documented, but perhaps it works ;-)
>
> Nope, it doesn't. MUIA_List_First really is a read-only item.
Did you try it on the List/FloatText object, or on the Listview one ?
because it's funny... in MUIA_Listview_ScrollerPos doc, Stefan wrote :
When you create the scrollbar on your own, connect it
to the list object (not listview object!) like this:
DoMethod(sbar,MUIM_Notify,MUIA_Prop_First ,MUIV_EveryTime,
list,3,MUIM_Set,MUIA_List_TopPixel,MUIV_TriggerValue);
DoMethod(list,MUIM_Notify,MUIA_List_TotalPixel ,MUIV_EveryTime,
sbar,3,MUIM_Set,MUIA_Prop_Entries ,MUIV_TriggerValue);
DoMethod(list,MUIM_Notify,MUIA_List_VisiblePixel,MUIV_EveryTime,
sbar,3,MUIM_Set,MUIA_Prop_Visible ,MUIV_TriggerValue);
DoMethod(list,MUIM_Notify,MUIA_List_TopPixel ,MUIV_EveryTime,
sbar,3,MUIM_Set,MUIA_Prop_First ,MUIV_TriggerValue);
So, the last notify can't work because MUIA_Prop_First is read only...
and MUIA_List_TopPixel, MUIA_List_TotalPixel, MUIA_List_VisiblePixel
are undocumented...
Gilles MASSON
Subject: Bitmaps & MUIM_List_CreateImage
Message-Id: <3126.6727T1063T309@zool.unizh.ch>
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Mailer: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
Lines: 82
Resent-Message-Id: <"dHQZJ2.0.ht.v-Uin"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List: archive/latest/1460
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
X-Lines: 83
Status: RO
Content-Type: text/plain; charset="us-ascii"
Content-Length: 3127
Hya.. :)
I'm trying to implement some bitmap images into a List/Listview. First I tried
it with a DisplayFunc for the list using something like this:
*array++ = "\33I[5:Images/www.iff]"
It worked more or less.. the image appeared in the list but its width wasn't
55pt but something smaller => it was cropped.
So I decided to load the images with datatypes, convert them to a
bitmap-object and (as seen in psi.c) use MUIM_List_CreateImage.
Unfortunately MUI's autodocs lack of any description what the arguments for
this method are supposed to mean. With psi.c I thought I found it out. The
object you do the method on should be the list itself.. as it seems :/
But if I do it this way the process crashes (80000004). If I use another
object like the app or the app's window I receive a NULL pointer :
DoMethod(app, MUIM_List_CreateImage, button.bitmap_obj, NULL);
I have to admit I don't do this Method in some kind of MUIM_setup function but
after the list was built.. I hope this is possible...
Here's a small excerpt of the code :
if(app)
{
struct BitMapHeader *bmhd;
struct BitMap *bitmap;
Object *datatype_obj; /* pointer to the Datatype Object */
Object *bitmap_obj; /* a mui BitmapObject */
Object *list_obj; /* the one that should be used in the list */
if(datatype_obj = NewDTObject("Images/www.iff",
DTA_SourceType , DTST_FILE,
DTA_GroupID , GID_PICTURE,
TAG_DONE))
{
if(DoMethod(datatype_obj, DTM_PROCLAYOUT, NULL, 1))
{
get(datatype_obj, PDTA_BitMapHeader, &bmhd);
GetDTAttrs(datatype_obj, PDTA_DestBitMap, &bitmap, TAG_DONE);
if(!bitmap)
GetDTAttrs(datatype_obj, PDTA_BitMap, &bitmap, TAG_DONE);
if(bitmap_obj = BitmapObject,
MUIA_Bitmap_SourceColors , xget(datatype_obj, PDTA_CRegs),
MUIA_Bitmap_Width , bmhd->bmh_Width,
MUIA_Bitmap_Height , bmhd->bmh_Height,
MUIA_FixWidth , bmhd->bmh_Width,
MUIA_FixHeight , bmhd->bmh_Height,
MUIA_Bitmap_Transparent , 0,
MUIA_Bitmap_Bitmap , bitmap,
End)
{
list_obj = (Object *)DoMethod(LV_ButtonBank, *)
MUIM_List_CreateImage, bitmap_obj, NULL);
}
}
}
}
*) this is the place where the crash occurs
Does somebody see what I'm doing wrong or is there a way to get a correct
sized image using the first method (DisplayFunc: "\33I[5:images/www.iff]") ?
Or would another aproach be preferable ?
Michael
Subject: Re: Bitmaps & MUIM_List_CreateImage
Date: 03 Jun 1996 00:14:59
References: <3126.6727T1063T309@zool.unizh.ch>
Organization: I&S Informatica e Servizi
X-Newsreader: MM v1.2x *UNREG*/NetGate 1.2a
Mime-Version: 1.0
Content-Transfer-Encoding: QUOTED-PRINTABLE
Resent-Message-Id: <"8fXEV2.0.Zq.Vbnin"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List: archive/latest/1477
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
X-Lines: 53
Status: RO
Content-Type: TEXT/PLAIN; charset="ISO-8859-1"
Content-Length: 1979
Hello Michael,
in a message dated 02 Jun 96 you wrote:
MN> I'm trying to implement some bitmap images into a List/Listview. First=
I
MN> tried it with a DisplayFunc for the list using something like this:
MN> *array++ =3D "\33I[5:Images/www.iff]"
In BackMan we use "\33I[4:PROGDIR:Images/]".
If you use "4:<...>", then your image should be a MUI brush, i.e. its
palette should be as in MUI:Docs/ImageDesign (this is a picture of standard
MUI brushes, if you didn't know).
MN> It worked more or less.. the image appeared in the list but its width
MN> wasn't 55pt but something smaller =3D> it was cropped.
Hmmm... Never had this problem. Maybe 55 pixel wide is too big? I don't
think that the docs mention any limitations, though.
MN> So I decided to load the images with datatypes, convert them to a
MN> bitmap-object and (as seen in psi.c) use MUIM_List_CreateImage.
You could (well... you should, IMHO) do the conversion once during
compilation, using the brush2c program. PSI does it that way, and I'm
planning to do the same as soon as I finish a couple of other things.
MN> Unfortunately MUI's autodocs lack of any description what the argument=
s
MN> for this method are supposed to mean.
Well, the autodoc mentions that the object passed to the method should be=
a
Bitmap or Bodychunk object. I guess that flags should be 0, since there are
no particular values documented.
MN> The object you do the method on should be the list itself.. [...]
MN> DoMethod(app, MUIM_List_CreateImage, button.bitmap_obj, NULL);
You *have* to invoke the method on the list itself, because it is a method
of List class (MUIM_List_...). That's for sure. Invoking it on something
else returns NULL (and does not crash the machine) just because it is not
implemented by other classes.
Ciao,
Flavio
Subject: Re: Bitmaps & MUIM_List_CreateImage
In-Reply-To: <3126.6727T1063T309@zool.unizh.ch> <199606031655.SAA22298@venere.inet.it>
Message-Id: <1977.6730T1166T2698@zool.unizh.ch>
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Mailer: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
Lines: 46
Resent-Message-ID: <"PxZG-1.0.EZ2.JYKkn"@susi>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.de
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.de
X-Mailing-List: archive/latest/1506
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.de
X-Lines: 47
Status: RO
Content-Type: text/plain; charset="us-ascii"
Content-Length: 1978
Hi Flavio,
MN>> I'm trying to implement some bitmap images into a List/Listview. First I
MN>> tried it with a DisplayFunc for the list using something like this:
MN>> *array++ = "\33I[5:Images/www.iff]"
>In BackMan we use "\33I[4:PROGDIR:Images/]".
This way they get cropped too. I gave up this solution anyway because I need
the bitmaps for buttons too.
>You could (well... you should, IMHO) do the conversion once during
>compilation, using the brush2c program. PSI does it that way, and I'm
Yes, but I *need* to add/remove entries dynamically from the list and the user
should be able to choose a brush for the entry. So at compilation I do not
know how many entries there will be and I do not know which icons the user
chooses.
This puts me in a difficult position because the MUIM_List_CreateImage should
be called in a function called by MUIM_Setup. But at startup the list is empty
and I would like to add entries with MUIM_List_InsertSingle. In the create-
function of the list I load the datatype object and create a bitmap out of it.
But I can't do a MUIM_List_CreateImage there since the machine will crash.
Is MUIM_List_CreateImage only applicable in MUIM_Setup, Stefan ??
>You *have* to invoke the method on the list itself, because it is a method
>of List class (MUIM_List_...). That's for sure. Invoking it on something
I must admit, that sounds logical ! Thanks.. :)
But if I do it on the list after MUIM_Setup 80000004 greets me.. :/
Michael
From: "Stefan Stuntz"
Date: Mon, 24 Jun 1996 19:23:38 +0100
X-Mailer: IntuiNews 1.3b Beta 7 (2.2.96)
Subject: Re: Bitmaps & MUIM_List_CreateImage
Message-ID: <81322827@magic.informatik.tu-muenchen.de>
Organization: Home of MUI
Resent-Message-ID: <"6uGI_2.0.-Q6.6ikpn"@susi>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.de
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.de
X-Mailing-List: archive/latest/1623
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.de
Content-Type: text
Content-Length: 590
X-Lines: 18
Status: RO
Michael Neuweiler wrote in article <1977.6730T1166T2698@zool.unizh.ch>:
> Is MUIM_List_CreateImage only applicable in MUIM_Setup, Stefan ??
You can call MUIM_List_CreateImage as soon as the list class completed
its setup method. You must call MUIM_List_DeleteImage before the list
completes its cleanup method.
> I must admit, that sounds logical ! Thanks.. :)
> But if I do it on the list after MUIM_Setup 80000004 greets me.. :/
Thats not supposed to happen. Please send me a little example
including source and (!) executable that demonstrates this
behaviour.
--
Greetings, Stefan